package com.jackchan.homework.sysw.service;

import com.jackchan.homework.sysw.entity.Supply;
import com.jackchan.homework.sysw.repository.SupplyDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Iterator;
import java.util.List;

/**
 * Created by ch-hui on 15/12/19.
 */
@Service
public class SupplyService {

    @Autowired
    private SupplyDao supplyDao;

    /**
     * 加载供应商列表
     * @return
     */
    public Iterable<Supply> findAll(){
        return supplyDao.findAll();
    }

    public Supply findOne(Long id){
        return supplyDao.findOne(id);
    }
}
